package com.aliang.shopping.service;

import com.aliang.shopping.common.PageResult;
import com.aliang.shopping.model.dto.common.PageDTO;
import com.aliang.shopping.model.dto.login.EmailLoginDTO;
import com.aliang.shopping.model.dto.login.LoginDTO;
import com.aliang.shopping.model.dto.login.PhoneLoginDTO;
import com.aliang.shopping.model.po.UserInfo;
import com.aliang.shopping.model.vo.CommonUserInfoVO;
import com.aliang.shopping.model.vo.UserInfoVO;
import com.aliang.shopping.security.auth.Payload;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
* @author ShiBaLover
* @description 针对表【user_info(用户信息表)】的数据库操作Service
* @createDate 2024-11-28 10:16:31
*/
public interface UserInfoService extends IService<UserInfo> {

    PageResult<UserInfoVO> selectPage(PageDTO pageDTO);

    Payload login(LoginDTO loginDTO);

    Payload emailLogin(EmailLoginDTO loginDTO);

    Payload phoneLogin(PhoneLoginDTO loginDTO);

    CommonUserInfoVO getUserInfo(Long id);

    void checkPhoneUnique(String phone);
    void checkEmailUnique(String email);

    Integer countWithPhone(String phone);

    int countWithEmail(String email);

    void sendNoticeMail(List<Long> userId, String msg);
}
